﻿using System.Globalization;
using Church.Abstractions.Interfaces.Helpers;
using Church.Helpers;
using DataBaseLayer.Services;

namespace Church.Resources
{
	public static class AppContext
	{
		#region Variables

		private static IXmlSerializerService _xmlSerializerService;
		private static ServiceFactory _serviceFactory;
		private static CultureInfo _cultureInfo;

		#endregion

		#region Properties

		public static IXmlSerializerService XmlSerializerService
		{
			get { return _xmlSerializerService ?? (_xmlSerializerService = new XmlSerializerService()); }
		}

		public static ServiceFactory ServiceFactory
		{
			get { return _serviceFactory ?? (_serviceFactory = new ServiceFactory()); }
		}

		public static CultureInfo CultureInfo
		{
			get { return _cultureInfo ?? (_cultureInfo = new CultureInfo("ru-Ru")); }
		}

		#endregion
	}
}